<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="帐套" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<script src="/js/popup_ext.js"></script>
<script language="javascript">
	function doNew(){
		var url="/system/TallySetNew.ihtm";
		ShowIframeNoScroll("帐套",url,350,225,"refreshWin()");
	}
	function refreshWin(){
		if(popRetVal!=null){
			window.location.reload(true);
		}
	}
	function doEdit(id){
		var url="/system/TallySetEdit.ihtm?id="+id;
		ShowIframeNoScroll("帐套",url,350,225,"refreshWin()");
	}
	function doDelete(id){
		ShowConfirm('确认框','确定删除吗？',340,80,"doDelAct("+id+")");
	}
	function doDelAct(id){
		if(popRetVal!=null){
			var fromUrl=encodeURIComponent(window.location);
			window.location="/system/TallySetDelete.ihtm?id="+id+"&from_url="+fromUrl;
		}
	}
	function doPause(id,flag){
		var fromUrl=encodeURIComponent(window.location);
		window.location="/system/TallySetPause.ihtm?id="+id+"&flag="+flag+"&from_url="+fromUrl;
	}
	function doCancel(){
		window.close();
	}
</script>
</head>
<body oncontextmenu="return false"  class="sheet" style="text-align:center;">
<div class="sheet-main" style="width:360px;text-align:left;margin:auto;">
  <div class="sheet-top">
    <div class="content">
      <h2>帐套管理</h2>
      <p>账套主要用于业务数据的独立核算，每个人只能看到得到授权的账套数据<br><a href="http://www.ekingcn.com/school/spjt_1656_181.html" target="_blank">如何应用多帐套实现分店分公司独立核算管理<img src="/images/play_button.gif"></a></p>
    </div>
  </div>
  <div class="sheet-list">
    <div class="search-business">
	    <div class="add_content"> 	
	    	 <div align="right"><input type="button" class="buttom search-add" value=" 新 增" onClick="doNew();"></div>
	     </div>
	     <%@include file="../inc/AlertMsg.jsp"%>
	     <div class="table-list">
	        <table width="100%">
	          <tr>	
					<th width="50%" >名称</th>
					<th width="15%" >状态</th>
					<th width="35%" >操作</th>
				</tr>   
				<c:forEach var="item" items="${list}">
				<c:if test="${item.enabled!='N'}">
				<tr <c:if test="${item.enabled=='P'}">style="color:red"</c:if>>
					<td >${item.title}</td>
					<td >
						<c:if test="${item.enabled=='Y'}">正常</c:if>
						<c:if test="${item.enabled=='P'}">停用</c:if>
					</td>
					<td >
						<a href="javascript:doEdit('${item.id}');">编辑</a>
						<c:if test="${item.enabled=='Y'}"><a href="javascript:doPause('${item.id}','P');">停用</a></c:if>
						<c:if test="${item.enabled=='P'}"><a href="javascript:doPause('${item.id}','Y');">启用</a></c:if>
						<c:if test="${item.sys=='N'}"><a href="javascript:doDelete('${item.id}');">删除</a></c:if>
					</td>
				</tr>
				</c:if>
				</c:forEach>
			</table>
	      </div>  
	   </div>  
  </div>
</div>
</body>
</html>
